<%-- 
    Document   : ConfirmBookTour
    Created on : Nov 1, 2011, 11:28:27 PM
    Author     : MrKoi
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@ page session="true" import="java.util.Collection" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="f" %>
<!DOCTYPE html>
<%
String Cbidtour="";
String user="";
String Cbnametour="";
String CbpriceAdu="";
String CbpriceChil="";
String CbnumberOfAdu="";
String CbnumberOfchild="";
String CbstartDate="";
String CbendDate="";
String Cbcash="";
String CbsumMoney="";
String CbsumGuest="";
float pA=0;
float pC=0;

if(session.getAttribute("User")!=null) {
    
    Cbidtour=session.getAttribute("Cbidtour").toString();
    user=session.getAttribute("User").toString();
    Cbnametour=session.getAttribute("Cbnametour").toString();
    CbpriceAdu=session.getAttribute("CbpriceAdu").toString();
    CbpriceChil=session.getAttribute("CbpriceChil").toString();
    CbnumberOfAdu=session.getAttribute("CbnumberOfAdu").toString();
    CbnumberOfchild=session.getAttribute("CbnumberOfchild").toString();
    CbstartDate=session.getAttribute("CbstartDate").toString();
    CbendDate=session.getAttribute("CbendDate").toString();
    Cbcash=session.getAttribute("Cbcash").toString();
    CbsumMoney=session.getAttribute("CbsumMoney").toString();
    CbsumGuest=session.getAttribute("CbsumGuest").toString();
    
    pA=Float.parseFloat(CbpriceAdu);
    pC=Float.parseFloat(CbpriceChil);
} else {
    out.println("<script>alert('Please login before book tour !');window.location='index.jsp';</script>");
    
}
%>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>JSP Page</title>
    </head>
    <body>
        <center>
                <span style="font-size: 20px;color: #343434;">Confirm Tour Booking</span></center>               
        <center>
            <table>
                
                <tr>
                    <td>
                        <form method="post" id="bookTour" action="ControllerBookTour" >
                            
                            <table border="0" width="490" style="background-color: #f7f6f6">                                
                                <tr>
                                    <td>
                                        <input type="hidden" id="users"  name="users" value="<%=user%>"/>
                                    </td>
                                    <td align="left"></td>
                                </tr>
                                <tr>
                                    <td align="left" colspan="2"><b>TOUR COST:</b></td>
                                </tr>
                                <tr>
                                    <td align="left">Tour name: </td>
                                    <td align="left"><label style="font-size:12px;"><b><%=Cbnametour%></b></label></td>
                                </tr>
                                <tr>
                                    <td align="left">Price for Adult: </td>
                                    <td align="left">
                                        <label><b><f:formatNumber value="<%=CbpriceAdu%>" pattern="$#,###"/> </b></label>
                                    </td>
                                </tr>
                                <tr>
                                    <td align="left">Price for Child: </td>
                                    <td align="left"> <label><b> <f:formatNumber value="<%=CbpriceChil%>" pattern="$#,###"/></b></label>
                                    </td>
                                </tr>
                                
                                <tr>
                                    <td colspan="2" align="left">(Children aged 12 years and older: charged as adults)</td>
                                </tr>
                                <tr>
                                    <td colspan="2"><b>INFORMATION OF THE REGISTRATION</b></td>
                                </tr>
                                
                                <tr>
                                    <td align="left">Start date of traveling: </td>
                                    <td align="left"><label> <%=CbstartDate%></label></td>
                                </tr>
                                <tr>
                                    <td align="left">End date of traveling: </td>
                                    <td align="left"><label> <%=CbendDate%></label></td>
                                </tr>
                                <tr>
                                    <td align="left">Number of adults traveling:  </td>
                                    <td align="left"><label> <%=CbnumberOfAdu%> person</label>
                                        
                                    </td>
                                </tr>
                                
                                <tr>
                                    <td align="left">Number of children traveling:  </td>
                                    <td align="left"><label> <%=CbnumberOfchild%> person</label>                                     
                                    </td>
                                </tr>    
                                <tr>
                                    <td>Total of guests:</td>
                                    <td><label><%=CbsumGuest%> person</label></td>
                                </tr>
                                <tr>
                                    <td colspan="2" align="left"><b>PAYMENT METHOD :</b></td>
                                </tr>
                                
                                <tr>
                                    <td align="left"> The cash:</td>
                                    <td align="left"><label><%=Cbcash%></label>                                       
                                        
                                    </td>
                                </tr>
                                <tr>
                                    <td>Sum money:</td>
                                    <td><label><f:formatNumber value="<%=CbsumMoney%>" pattern="$#,###"/></label></td>
                                </tr>
                                <tr>
                                    <td colspan="2"><input id="idtourr" name="idtourr" type="hidden" value="<%=Cbidtour%>"/></td>
                                </tr>
                                <tr>
                                    <td colspan="2"><input id="nametourr" name="nametourr" type="hidden" value="<%=Cbnametour%>"/></td>
                                </tr>
                                <tr>
                                    <td colspan="2"><input id="app" name="app" type="hidden" value="<%=pA%>"/> </td>
                                </tr>  
                                <tr>
                                    <td colspan="2"><input id="cpp" name="cpp" type="hidden" value="<%=pC%>"/> </td>
                                </tr>  
                                <tr>
                                    <td colspan="2"><input id="opadultt" name="opadultt" type="hidden" value="<%=CbnumberOfAdu%>"/> </td>
                                </tr>  
                                <tr>
                                    <td colspan="2"><input id="opchildd" name="opchildd" type="hidden" value="<%=CbnumberOfchild%>"/> </td>
                                </tr>  
                                <tr>
                                    <td colspan="2"><input id="startdatee" name="startdatee" type="hidden" value="<%=CbstartDate%>"/> </td>
                                </tr>  
                                <tr>
                                    <td colspan="2"><input id="enddatee" name="enddatee" type="hidden" value="<%=CbendDate%>"/> </td>
                                </tr>  
                                <tr>
                                    <td colspan="2"><input id="methodPayy" name="methodPayy" type="hidden" value="<%=Cbcash%>"/> </td>
                                </tr>                                                                  
                                <tr>
                                    <td align="right">
                                        <input type="submit" name="send" value="Confirm booking" id="send" style="border:none;width:120px;height:23px;padding-bottom:2px;text-align:center;margin:0px 10px;font-size:12px;background-image:url(skinImgTuor/btnSmall.jpg);color:black;"/>
                                    </td>
                                    
                                </tr>                                
                            </table>
                        </form>
                    </td>
                </tr>
                <tr>
                    <td colspan="2" align="left" style="color:#CC3333"><b>Note :</b> After you finished book here, We will call to you in 24 h </td>
                </tr>
                <tr>
                    <td colspan="2" align="left" style="color:#CC3333">Please show details and price of the flights before </td>
                </tr>
            </table>
            
            
        </center>
        
        
    </body>
</html>
